var api = {
	/** 公共 ↓ **/
	common: {
		getOauthApi: utils("/oauth/auth", "GET", false),
		getOtokenApi: utils("/oauth/token", "POST", false),
		//单图上传
		uploadImageApi: uploadUtils("/storage/image", "POST",'image', false), 
		uploadImagesApi: uploadUtils("/storage/image-list","POST",'image', false),
	
		getMiniAppOpenidApi: uploadUtils("/api/user/getminiAppOpenid", "POST",'image', false), 
	},
	login: {
		//    账号登录
		loginAccountApi: utils("/api/index/loginweb", "POST", false),
		//  验证码登录
		loginCodeApi: utils("/api/user/miniAppLogin", "POST", false),
		// 获取短信验证码
		captchaSmsApi: utils("/api/index/sendcode", "POST", false),
		// 获取验证码(forget)
		captchaSmsApi: utils("/api/account/sendsms", "POST", false),
		// 获取用户信息
		accountUserInfoApi: utils("/api/account/userinfo", "POST", false),
		// 修改个人资料
		editUserInfoApi: utils("/api/account/useredit", "POST", false),
		//  用户注册
		registerApi: utils("/api/account/register", "POST", false),
		//  免责协议
		aboutWaiverApi: utils("/index/about/waiver", "POST", false),
		
		
		//    司机端账号登录
		dLoginAccountApi: utils("/v1/accounts/driver/login", "POST", false),
		//    司机端验证码登录
		dLoginCodeApi: utils("/v1/accounts/driver/sms", "POST", false),
		
		//    商家端更换手机号
		sChangeMobileApi: utils("/v1/accounts/shipper/mobile", "POST", false),
		//    司机端更换手机号
		dChangeMobileApi: utils("/v1/accounts/driver/mobile", "POST", false),
		
		//  修改登录密码
		aPasswordLoginApi: utils("/v1/accounts/password/login", "POST", false),
		
		//  司机注册
		dRegisterApi: utils("/v1/accounts/driver/register", "POST", false),
		
		//获取用户详情
		memberInfo: utils("/apim/member/info", "POST", false),
		
	},

	order: {
		
		waybillLogApi: utils("/apim/waybill/getWaybillLog", "POST", false),
		// 	订单列表——上拉加载
		waybllListApi: utils("/apit/waybill/getlist", "POST", false),
		//1.分拨中心- 车次列表
		journeyList: utils("/apit/journey/getList", "POST", false),
		//2. 分拨中心-运单列表
		allocationList: utils("/apit/Allocation/getlist", "POST", false),
		//发货凭证
		departCertificate: utils("/apit/journey/departCertificate", "POST", false),
		//到货凭证
		deliverytCertificate: utils("/apit/journey/deliverytCertificate", "POST", false),
		
		//详情
		waybillDetailApi: utils("/apit/waybill/getinfo", "POST", false),
		//1. 分拨 非平台运单到达
		allocationReach: utils("/apit/Allocation/waybillReach", "POST", false),
		//2. 分拨 非平台运单签收
		allocationSignFor: utils("/apit/Allocation/waybillSignFor", "POST", false),
		//3. 分拨 非平台运单支付状态
		allocationPayStatus: utils("/apit/Allocation/waybillPayStatus", "POST", false),
		//2. 分拨中心-分拨到非平台运单
		allocationNoPlatForm: utils("/apit/Allocation/noPlatformWaybill", "POST", false),
		//非平台运单手动插入轨迹
		allocationAddLog: utils("/apit/waybill/addWaybillLog", "POST", false),
		//获取运单号
		setWaybillSn: utils("/apit/waybill/setSn", "POST", false),
		/** 搜索地区价格 **/
		logisticsPriceSearchs: utils('/apit/logistics_price/searchs', "POST", false),
		/** 获取平台公司服务费配置 **/
		logisticsServiceCharge: utils('/apit/logistics/getServiceCharge', "POST", false),
		//获取省市区数据
		sProvinceListApi:utils("/api/User_Address/getAreaListByPid", "POST", false),
		// 	POST一键下单sAddOrderApi
		waybillCreate: utils("/apit/waybill/add", "POST", false),
		//删除运单
		waybillDelete: utils("/apit/waybill/delete", "POST", false),
		//编辑运单
		waybillEdit: utils("/apit/waybill/edit", "POST", false),
		
		
		 
		//扫码二维码获取运单轨迹查询
		scanGetWaybillLogApi: utils("/api/common/scanGetWaybillLog", "POST", false),
		//扫码二维码获取运单详情
		scanGetWaybillInfoApi: utils("/api/common/scanGetWaybillInfo", "POST", false),
		//计算同城配送价格
		sOrderFreightApi: utils("/v1/shippers/order/freight", "GET", false),
		
		//详情
		sWaybillDetailApi: utils("/apim/waybill/getinfo", "POST", false),
		//编辑订单
		sOrderUpdateApi: utils("/api/order/updateOrder", "POST", false),
		//编辑运单
		sWaybillUpdateApi: utils("/apim/waybill/updateOrder", "POST", false),

		
		
		
		// 取消订单
		sOrderCancelApi: utils("/api/order/cancelOrder", "POST", false), 
		//  评价tags
		sOrderCommentTagsApi: utils("/v1/shippers/order/comment-tags", "GET", false),
		//  add评价
		sAddOrderCommentApi: utils("/v1/shippers/order/comment", "POST", false),

		
		//网点详情
		sSiteInfoApi:utils("/api/order/LogisticsSiteInfo", "POST", false),
		
	},

	pay:{
		// 支付
		sOrderPayApi: utils("/api/order/payOrder", "POST", false),
	},

	home: {
		// 广告
		sAdListApi: utils("/api/Pictures/getPicturesList", "GET", false),
		// 物流公司列表
		logisticsListApi: utils("/api/logistics/getlist", "POST", false),
		// 物流公司信息
		logisticsInfoApi: utils("/api/logistics/getinfo", "POST", false),
		//  物流网点列表
		logisticsSiteListApi: utils("/api/logistics_site/getlist", "POST", false),	
		
		// 线路查询
		logisticsLineApi: utils("/api/logistics_trace/getlist", "POST", false),
		//  优惠信息列表
		messageDiscountApi: utils("/v1/messages/discount", "GET", false),
		//  消息列表
		messageListApi: utils("/v1/messages/list", "GET", false),
		//  删除消息
		messageDeleteApi: utils("/v1/messages/delete", "POST", false),
	},

	mine: {
		//员工
		getAuthAllMember: utils("/apim/auth/getAllMember", "POST", false),
		// 删除账号
		delMember: utils("/apim/member/del", "POST", false),
		// 编辑账号
		editMember: utils("/apim/member/edit", "POST", false),
		// 网点树状列表
		siteTreeList: utils("/apim/logistics_site/getlisttree", "POST", false),
		
		
		
		// 更换头像
		mineUsersAvatarApi: utils("/v1/users/avatar", "POST", false),
		//司机个人信息
		mineDriverInfoApi: utils("/v1/accounts/driver/info", "GET", false),
		//商家个人信息
		mineShipperInfoApi: utils("/api/user/index", "POST", false),
		//我的常用物流公司
		mineGetOftenLogisticsApi: utils("/v1/logistics/getoftenlogistics", "GET", false),
		//我的客户
		mineShippersOrderCustomerApi: utils("/v1/shippers/order/customer", "GET", false),
		
		//投诉建议列表
		mineComplaintListApi: utils("/v1/complaint/list", "POST", false),
		//投诉详情
		mineComplaintDetailApi: utils("/v1/complaint/detail", "POST", false),
		//常见问题接口
		mineComplaintProblemApi: utils("/v1/complaint/problem", "POST", false),
		//投诉类型
		mineComplaintTypeApi: utils("/v1/complaint/type", "POST", false),
		//投诉咨询
		mineComplaintAddApi: utils("/v1/complaint/add", "POST", false),

		
		 
	},
	auth:{
		// 获取实名认证
		sAuthApi: utils("/v1/shippers/auth", "POST", false),
		//  修改实名认证
		sUpdateAuthApi: utils("/v1/shippers/updateauth", "POST", false),
		//  提交实名认证
		sAuthAddApi: utils("/v1/shippers/auth", "POST", false),
	},
	sDriver: {
		// 常用司机
		sAddonsOftenDriversApi: utils("/v1/shippers/addons/oftendrivers", "GET", false),
		// 收藏司机列表
		sAddonsStarDriverListApi: utils("/v1/shippers/addons/stardriverlist", "GET", false),
		// 添加收藏司机
		sAddonsAddStarDriverApi: utils("/v1/shippers/addons/addstardriver", "POST", false),
		// 取消收藏司机
		sAddonsDelStarDriverApi: utils("/v1/shippers/addons/delstardriver", "POST", false),

	},
	address: {
		//  GET地址列表
		shippersAddressListApi: utils("/v1/shippers/address", "GET", false),
		//  POST添加地址
		shippersAddressAddApi: utils("/v1/shippers/address", "POST", false),
		//  删除地址
		shippersAddressDelApi: utils("/v1/shippers/address/del", "POST", false),
		//  编辑地址
		shippersAddressEditApi: utils("/v1/shippers/address/edit", "POST", false),
		//  地区三级联动
		utilsAreaEditApi: utils("/v1/utils/area", "GET", false), 

	},
	setting: {
		//  关于
		wUtilsAboutApi: utils("/v1/utils/about", "GET", false),
		//   功能介绍
		wShippersIntroductionApi: utils("/v1/shippers/introduction", "GET", false),
		//   功能介绍
		wDriversIntroductionApi: utils("/v1/drivers/introduction", "GET", false),
		//  下单协议
		wShippersOrderTreatyApi: utils("/v1/shippers/order/treaty", "GET", false),
		//  注册协议
		wUtilsRegTreatyApi: utils("/v1/utils/regTreaty", "GET", false),
		//  获取合同认证链接司机
		wQiyuesuoDriverUserauthpageApi: utils("/v1/qiyuesuo/driver/userauthpage", "POST", false),
		//   获取合同认证链接货主
		wQiyuesuoShipperUserauthpageApi: utils("/v1/qiyuesuo/shipper/userauthpage", "POST", false),
		//  创建合同草稿、发起合同 商家
		wQiyuesuoShipperContractApi: utils("/v1/qiyuesuo/shipper/contract", "POST", false),
		//  创建司机合同
		wQiyuesuoDriverContractApi: utils("/v1/qiyuesuo/driver/contract", "POST", false),
		// 获取司机合同
		wQiyuesuoDriverContractPageApi: utils("/v1/qiyuesuo/driver/contractPage", "POST", false),
		//  获取商家合同
		wQiyuesuoShipperContractPageApi: utils("/v1/qiyuesuo/shipper/contractPage", "POST", false),

	},
};

function utils(url, method, isAes) {
	var data = {
		url: url,
		method: method,
		isAes: isAes,
	}
	return data;
}
function uploadUtils(url, method,fileType, isAes) {
	var data = {
		url: url,
		method: method,
		isAes: isAes,
		fileType:fileType,
	}
	return data;
}


export default api
